<?php

/**
 * This is the model class for table "ws_call_current".
 *
 * The followings are the available columns in table 'ws_call_current':
 * @property string $RecId
 * @property integer $SetId
 * @property integer $Direction
 * @property string $IncommingID
 * @property string $OutgoingID
 * @property string $OriginalCallingNumber
 * @property string $OriginalCallingNumberNatureOfAddress
 * @property string $TranslatedCallingNumber
 * @property string $TranslatedCallingNumberNatureOfAddress
 * @property string $OriginalCalledNumber
 * @property string $OriginalCalledNumberNatureOfAddress
 * @property string $TranslatedCalledNumber
 * @property string $TranslatedCalledNumberNatureOfAddress
 * @property string $CallType
 * @property string $RedirectedNumber
 * @property string $SeizeDate
 * @property string $SeizeTime
 * @property string $DisconnectTime
 * @property string $SystemTime
 * @property string $ChargeTime
 * @property integer $CompletionCode
 * @property integer $ResourceGroupID
 * @property integer $OtherResourceGroupID
 * @property integer $ResourceID
 * @property integer $OtherResourceID
 * @property integer $MediaResourceID
 * @property integer $OZZCode
 * @property integer $CarrierCode
 * @property integer $ReleaseCause
 * @property integer $RouteListID
 * @property integer $FirstTriedRoute
 * @property integer $LastTriedRoute
 * @property integer $ResourceType
 * @property string $RemoteGW
 * @property string $RemoteRTP
 * @property integer $RemoteRTPPort
 * @property integer $RemoteRTPFaxPort
 * @property string $MediaIP
 * @property integer $MediaPort
 * @property integer $MediaFaxPort
 * @property integer $PacketsSent
 * @property integer $PacketsReceived
 * @property integer $PacketsLost
 * @property integer $PacketsForRG
 * @property integer $PacketsForRL
 * @property integer $NumberOfTries
 * @property string $RoutingNumber
 * @property string $ReleaseInitiator
 * @property string $ReleaseCode
 * @property string $Reserved
 * @property integer $JIP
 * @property string $UserDefined
 * @property string $PPRUserID
 * @property string $ProductID
 * @property string $CPInstanceID
 * @property string $OtherCPInstanceID
 * @property string $SignalingDDAddress
 * @property string $MediaDDAddress
 * @property integer $SignalingRGIdleCount
 * @property integer $MediaRGIdleCount
 * @property string $Flag1
 * @property integer $JRType
 * @property string $Flag2
 * @property string $RTIndex
 * @property string $LNPInfo
 * @property string $RN
 * @property string $GAP
 * @property string $OLRN
 * @property string $CarrID
 * @property string $Account
 * @property string $SeizeDateTime
 * @property string $IN_Prefix
 * @property string $IN_CountryName
 * @property integer $IN_Duration
 * @property integer $IN_RndDuration
 * @property string $IN_Rate
 * @property string $IN_AmountCharge
 * @property string $IN_RndStyle
 * @property string $OUT_Prefix
 * @property string $OUT_CountryName
 * @property integer $OUT_Duration
 * @property integer $OUT_RndDuration
 * @property string $OUT_Rate
 * @property string $OUT_AmountCharge
 * @property string $OUT_RndStyle
 * @property integer $IDSwitch
 * @property integer $IDPrcFile
 * @property integer $InAccount
 * @property integer $OutAccount
 * @property integer $IsComplete
 * @property integer $IsBillable
 * @property integer $PDD
 */
class WSCALLCURRENT extends MyActiveRecord //my is mean mysql database
{
	/**
	 * Returns the static model of the specified AR class.
	 * @param string $className active record class name.
	 * @return WSCALLCURRENT the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'ws_call_current';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('RecId, SeizeDateTime', 'required'),
			array('SetId, Direction, CompletionCode, ResourceGroupID, OtherResourceGroupID, ResourceID, OtherResourceID, MediaResourceID, OZZCode, CarrierCode, ReleaseCause, RouteListID, FirstTriedRoute, LastTriedRoute, ResourceType, RemoteRTPPort, RemoteRTPFaxPort, MediaPort, MediaFaxPort, PacketsSent, PacketsReceived, PacketsLost, PacketsForRG, PacketsForRL, NumberOfTries, JIP, SignalingRGIdleCount, MediaRGIdleCount, JRType, IN_Duration, IN_RndDuration, OUT_Duration, OUT_RndDuration, IDSwitch, IDPrcFile, InAccount, OutAccount, IsComplete, IsBillable, PDD', 'numerical', 'integerOnly'=>true),
			array('RecId, OriginalCallingNumber, TranslatedCallingNumber, OriginalCalledNumber, TranslatedCalledNumber, RedirectedNumber', 'length', 'max'=>32),
			array('IncommingID, OutgoingID', 'length', 'max'=>64),
			array('OriginalCallingNumberNatureOfAddress, TranslatedCallingNumberNatureOfAddress, TranslatedCalledNumberNatureOfAddress, RemoteGW, MediaIP, IN_Prefix, OUT_Prefix', 'length', 'max'=>15),
			array('OriginalCalledNumberNatureOfAddress, CallType, Flag1, Flag2, LNPInfo', 'length', 'max'=>1),
			array('RemoteRTP', 'length', 'max'=>20),
			array('RoutingNumber, ProductID, IN_RndStyle, OUT_RndStyle', 'length', 'max'=>10),
			array('ReleaseInitiator, ReleaseCode, CPInstanceID, OtherCPInstanceID', 'length', 'max'=>3),
			array('Reserved', 'length', 'max'=>4),
			array('UserDefined, PPRUserID', 'length', 'max'=>24),
			array('SignalingDDAddress, MediaDDAddress, IN_Rate, IN_AmountCharge, OUT_Rate, OUT_AmountCharge', 'length', 'max'=>12),
			array('RTIndex', 'length', 'max'=>2),
			array('RN, GAP, OLRN', 'length', 'max'=>11),
			array('CarrID', 'length', 'max'=>5),
			array('Account', 'length', 'max'=>18),
			array('IN_CountryName, OUT_CountryName', 'length', 'max'=>50),
			array('SeizeDate, SeizeTime, DisconnectTime, SystemTime, ChargeTime', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('RecId, SetId, Direction, IncommingID, OutgoingID, OriginalCallingNumber, OriginalCallingNumberNatureOfAddress, TranslatedCallingNumber, TranslatedCallingNumberNatureOfAddress, OriginalCalledNumber, OriginalCalledNumberNatureOfAddress, TranslatedCalledNumber, TranslatedCalledNumberNatureOfAddress, CallType, RedirectedNumber, SeizeDate, SeizeTime, DisconnectTime, SystemTime, ChargeTime, CompletionCode, ResourceGroupID, OtherResourceGroupID, ResourceID, OtherResourceID, MediaResourceID, OZZCode, CarrierCode, ReleaseCause, RouteListID, FirstTriedRoute, LastTriedRoute, ResourceType, RemoteGW, RemoteRTP, RemoteRTPPort, RemoteRTPFaxPort, MediaIP, MediaPort, MediaFaxPort, PacketsSent, PacketsReceived, PacketsLost, PacketsForRG, PacketsForRL, NumberOfTries, RoutingNumber, ReleaseInitiator, ReleaseCode, Reserved, JIP, UserDefined, PPRUserID, ProductID, CPInstanceID, OtherCPInstanceID, SignalingDDAddress, MediaDDAddress, SignalingRGIdleCount, MediaRGIdleCount, Flag1, JRType, Flag2, RTIndex, LNPInfo, RN, GAP, OLRN, CarrID, Account, SeizeDateTime, IN_Prefix, IN_CountryName, IN_Duration, IN_RndDuration, IN_Rate, IN_AmountCharge, IN_RndStyle, OUT_Prefix, OUT_CountryName, OUT_Duration, OUT_RndDuration, OUT_Rate, OUT_AmountCharge, OUT_RndStyle, IDSwitch, IDPrcFile, InAccount, OutAccount, IsComplete, IsBillable, PDD', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'RecId' => 'Rec',
			'SetId' => 'Set',
			'Direction' => 'Direction',
			'IncommingID' => 'Incomming',
			'OutgoingID' => 'Outgoing',
			'OriginalCallingNumber' => 'Original Calling Number',
			'OriginalCallingNumberNatureOfAddress' => 'Original Calling Number Nature Of Address',
			'TranslatedCallingNumber' => 'Translated Calling Number',
			'TranslatedCallingNumberNatureOfAddress' => 'Translated Calling Number Nature Of Address',
			'OriginalCalledNumber' => 'Original Called Number',
			'OriginalCalledNumberNatureOfAddress' => 'Original Called Number Nature Of Address',
			'TranslatedCalledNumber' => 'Translated Called Number',
			'TranslatedCalledNumberNatureOfAddress' => 'Translated Called Number Nature Of Address',
			'CallType' => 'Call Type',
			'RedirectedNumber' => 'Redirected Number',
			'SeizeDate' => 'Seize Date',
			'SeizeTime' => 'Seize Time',
			'DisconnectTime' => 'Disconnect Time',
			'SystemTime' => 'System Time',
			'ChargeTime' => 'Charge Time',
			'CompletionCode' => 'Completion Code',
			'ResourceGroupID' => 'Resource Group',
			'OtherResourceGroupID' => 'Other Resource Group',
			'ResourceID' => 'Resource',
			'OtherResourceID' => 'Other Resource',
			'MediaResourceID' => 'Media Resource',
			'OZZCode' => 'Ozzcode',
			'CarrierCode' => 'Carrier Code',
			'ReleaseCause' => 'Release Cause',
			'RouteListID' => 'Route List',
			'FirstTriedRoute' => 'First Tried Route',
			'LastTriedRoute' => 'Last Tried Route',
			'ResourceType' => 'Resource Type',
			'RemoteGW' => 'Remote Gw',
			'RemoteRTP' => 'Remote Rtp',
			'RemoteRTPPort' => 'Remote Rtpport',
			'RemoteRTPFaxPort' => 'Remote Rtpfax Port',
			'MediaIP' => 'Media Ip',
			'MediaPort' => 'Media Port',
			'MediaFaxPort' => 'Media Fax Port',
			'PacketsSent' => 'Packets Sent',
			'PacketsReceived' => 'Packets Received',
			'PacketsLost' => 'Packets Lost',
			'PacketsForRG' => 'Packets For Rg',
			'PacketsForRL' => 'Packets For Rl',
			'NumberOfTries' => 'Number Of Tries',
			'RoutingNumber' => 'Routing Number',
			'ReleaseInitiator' => 'Release Initiator',
			'ReleaseCode' => 'Release Code',
			'Reserved' => 'Reserved',
			'JIP' => 'Jip',
			'UserDefined' => 'User Defined',
			'PPRUserID' => 'Ppruser',
			'ProductID' => 'Product',
			'CPInstanceID' => 'Cpinstance',
			'OtherCPInstanceID' => 'Other Cpinstance',
			'SignalingDDAddress' => 'Signaling Ddaddress',
			'MediaDDAddress' => 'Media Ddaddress',
			'SignalingRGIdleCount' => 'Signaling Rgidle Count',
			'MediaRGIdleCount' => 'Media Rgidle Count',
			'Flag1' => 'Flag1',
			'JRType' => 'Jrtype',
			'Flag2' => 'Flag2',
			'RTIndex' => 'Rtindex',
			'LNPInfo' => 'Lnpinfo',
			'RN' => 'Rn',
			'GAP' => 'Gap',
			'OLRN' => 'Olrn',
			'CarrID' => 'Carr',
			'Account' => 'Account',
			'SeizeDateTime' => 'Seize Date Time',
			'IN_Prefix' => 'In Prefix',
			'IN_CountryName' => 'In Country Name',
			'IN_Duration' => 'In Duration',
			'IN_RndDuration' => 'In Rnd Duration',
			'IN_Rate' => 'In Rate',
			'IN_AmountCharge' => 'In Amount Charge',
			'IN_RndStyle' => 'In Rnd Style',
			'OUT_Prefix' => 'Out Prefix',
			'OUT_CountryName' => 'Out Country Name',
			'OUT_Duration' => 'Out Duration',
			'OUT_RndDuration' => 'Out Rnd Duration',
			'OUT_Rate' => 'Out Rate',
			'OUT_AmountCharge' => 'Out Amount Charge',
			'OUT_RndStyle' => 'Out Rnd Style',
			'IDSwitch' => 'Idswitch',
			'IDPrcFile' => 'Idprc File',
			'InAccount' => 'In Account',
			'OutAccount' => 'Out Account',
			'IsComplete' => 'Is Complete',
			'IsBillable' => 'Is Billable',
			'PDD' => 'Pdd',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('RecId',$this->RecId,true);
		$criteria->compare('SetId',$this->SetId);
		$criteria->compare('Direction',$this->Direction);
		$criteria->compare('IncommingID',$this->IncommingID,true);
		$criteria->compare('OutgoingID',$this->OutgoingID,true);
		$criteria->compare('OriginalCallingNumber',$this->OriginalCallingNumber,true);
		$criteria->compare('OriginalCallingNumberNatureOfAddress',$this->OriginalCallingNumberNatureOfAddress,true);
		$criteria->compare('TranslatedCallingNumber',$this->TranslatedCallingNumber,true);
		$criteria->compare('TranslatedCallingNumberNatureOfAddress',$this->TranslatedCallingNumberNatureOfAddress,true);
		$criteria->compare('OriginalCalledNumber',$this->OriginalCalledNumber,true);
		$criteria->compare('OriginalCalledNumberNatureOfAddress',$this->OriginalCalledNumberNatureOfAddress,true);
		$criteria->compare('TranslatedCalledNumber',$this->TranslatedCalledNumber,true);
		$criteria->compare('TranslatedCalledNumberNatureOfAddress',$this->TranslatedCalledNumberNatureOfAddress,true);
		$criteria->compare('CallType',$this->CallType,true);
		$criteria->compare('RedirectedNumber',$this->RedirectedNumber,true);
		$criteria->compare('SeizeDate',$this->SeizeDate,true);
		$criteria->compare('SeizeTime',$this->SeizeTime,true);
		$criteria->compare('DisconnectTime',$this->DisconnectTime,true);
		$criteria->compare('SystemTime',$this->SystemTime,true);
		$criteria->compare('ChargeTime',$this->ChargeTime,true);
		$criteria->compare('CompletionCode',$this->CompletionCode);
		$criteria->compare('ResourceGroupID',$this->ResourceGroupID);
		$criteria->compare('OtherResourceGroupID',$this->OtherResourceGroupID);
		$criteria->compare('ResourceID',$this->ResourceID);
		$criteria->compare('OtherResourceID',$this->OtherResourceID);
		$criteria->compare('MediaResourceID',$this->MediaResourceID);
		$criteria->compare('OZZCode',$this->OZZCode);
		$criteria->compare('CarrierCode',$this->CarrierCode);
		$criteria->compare('ReleaseCause',$this->ReleaseCause);
		$criteria->compare('RouteListID',$this->RouteListID);
		$criteria->compare('FirstTriedRoute',$this->FirstTriedRoute);
		$criteria->compare('LastTriedRoute',$this->LastTriedRoute);
		$criteria->compare('ResourceType',$this->ResourceType);
		$criteria->compare('RemoteGW',$this->RemoteGW,true);
		$criteria->compare('RemoteRTP',$this->RemoteRTP,true);
		$criteria->compare('RemoteRTPPort',$this->RemoteRTPPort);
		$criteria->compare('RemoteRTPFaxPort',$this->RemoteRTPFaxPort);
		$criteria->compare('MediaIP',$this->MediaIP,true);
		$criteria->compare('MediaPort',$this->MediaPort);
		$criteria->compare('MediaFaxPort',$this->MediaFaxPort);
		$criteria->compare('PacketsSent',$this->PacketsSent);
		$criteria->compare('PacketsReceived',$this->PacketsReceived);
		$criteria->compare('PacketsLost',$this->PacketsLost);
		$criteria->compare('PacketsForRG',$this->PacketsForRG);
		$criteria->compare('PacketsForRL',$this->PacketsForRL);
		$criteria->compare('NumberOfTries',$this->NumberOfTries);
		$criteria->compare('RoutingNumber',$this->RoutingNumber,true);
		$criteria->compare('ReleaseInitiator',$this->ReleaseInitiator,true);
		$criteria->compare('ReleaseCode',$this->ReleaseCode,true);
		$criteria->compare('Reserved',$this->Reserved,true);
		$criteria->compare('JIP',$this->JIP);
		$criteria->compare('UserDefined',$this->UserDefined,true);
		$criteria->compare('PPRUserID',$this->PPRUserID,true);
		$criteria->compare('ProductID',$this->ProductID,true);
		$criteria->compare('CPInstanceID',$this->CPInstanceID,true);
		$criteria->compare('OtherCPInstanceID',$this->OtherCPInstanceID,true);
		$criteria->compare('SignalingDDAddress',$this->SignalingDDAddress,true);
		$criteria->compare('MediaDDAddress',$this->MediaDDAddress,true);
		$criteria->compare('SignalingRGIdleCount',$this->SignalingRGIdleCount);
		$criteria->compare('MediaRGIdleCount',$this->MediaRGIdleCount);
		$criteria->compare('Flag1',$this->Flag1,true);
		$criteria->compare('JRType',$this->JRType);
		$criteria->compare('Flag2',$this->Flag2,true);
		$criteria->compare('RTIndex',$this->RTIndex,true);
		$criteria->compare('LNPInfo',$this->LNPInfo,true);
		$criteria->compare('RN',$this->RN,true);
		$criteria->compare('GAP',$this->GAP,true);
		$criteria->compare('OLRN',$this->OLRN,true);
		$criteria->compare('CarrID',$this->CarrID,true);
		$criteria->compare('Account',$this->Account,true);
		$criteria->compare('SeizeDateTime',$this->SeizeDateTime,true);
		$criteria->compare('IN_Prefix',$this->IN_Prefix,true);
		$criteria->compare('IN_CountryName',$this->IN_CountryName,true);
		$criteria->compare('IN_Duration',$this->IN_Duration);
		$criteria->compare('IN_RndDuration',$this->IN_RndDuration);
		$criteria->compare('IN_Rate',$this->IN_Rate,true);
		$criteria->compare('IN_AmountCharge',$this->IN_AmountCharge,true);
		$criteria->compare('IN_RndStyle',$this->IN_RndStyle,true);
		$criteria->compare('OUT_Prefix',$this->OUT_Prefix,true);
		$criteria->compare('OUT_CountryName',$this->OUT_CountryName,true);
		$criteria->compare('OUT_Duration',$this->OUT_Duration);
		$criteria->compare('OUT_RndDuration',$this->OUT_RndDuration);
		$criteria->compare('OUT_Rate',$this->OUT_Rate,true);
		$criteria->compare('OUT_AmountCharge',$this->OUT_AmountCharge,true);
		$criteria->compare('OUT_RndStyle',$this->OUT_RndStyle,true);
		$criteria->compare('IDSwitch',$this->IDSwitch);
		$criteria->compare('IDPrcFile',$this->IDPrcFile);
		$criteria->compare('InAccount',$this->InAccount);
		$criteria->compare('OutAccount',$this->OutAccount);
		$criteria->compare('IsComplete',$this->IsComplete);
		$criteria->compare('IsBillable',$this->IsBillable);
		$criteria->compare('PDD',$this->PDD);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}